import request from '@/utils/request'

// 查询论坛-评论列表
export function listReview(query) {
  return request({
    url: '/forum/review/list',
    method: 'get',
    params: query
  })
}

// 查询论坛-评论列表(当个帖子的区别评论)
export function listReviewForPostId(query) {
  return request({ 
    url: '/forum/review/listForPostId',
    method: 'get',
    params: query
  })
}

// 查询论坛-评论详细
export function getReview(id) {
  return request({
    url: '/forum/review/' + id,
    method: 'get'
  })
}

// 查询论坛-某一天的新增贴子数量
export function getReviewNumberForDate(date) {
  return request({
    url: '/forum/review/number/'+date,
    method: 'get',
  })
}

// 新增论坛-评论
export function addReview(data) {
  return request({
    url: '/forum/review',
    method: 'post',
    data: data
  })
}

// 修改论坛-评论
export function updateReview(data) {
  return request({
    url: '/forum/review',
    method: 'put',
    data: data
  })
}

// 删除论坛-评论
export function delReview(id) {
  return request({
    url: '/forum/review/' + id,
    method: 'delete'
  })
}
